local zhuosheng = fk.CreateSkill{
    name = "jinhs__zhuosheng",
}

Fk:loadTranslationTable{
    ["jinhs__zhuosheng"] = "擢升",
    [":jinhs__zhuosheng"] = "每回合限一次，你可以将至少两张手牌当任意基本牌使用或打出，若其中包含应变牌，此牌无视条件并获得相同的应变效果。",

    ["#jinhs__zhuosheng"] = "擢升：你可以将至少两张手牌当任意基本牌使用或打出",

    ["$jinhs__zhuosheng1"] = "才经世务，干用之绩。",
    ["$jinhs__zhuosheng2"] = "器量之远，当至公辅。",
}

zhuosheng:addEffect("viewas",{
    anim_type = "special",
    pattern = ".|.|.|.|.|basic",
    prompt = "#jinhs__zhuosheng",
    handly_pile = true,
    interaction = function(self, player)
      local all_names = Fk:getAllCardNames("b")
      local names = player:getViewAsCardNames(zhuosheng.name, all_names)
      if #names > 0 then
        return UI.CardNameBox { choices = names, all_choices = all_names }
      end
    end,
    card_filter = function(self, player, to_select, selected)
      return table.contains(player:getHandlyIds(), to_select)
    end,
    before_use = function(self, player, use)
      for _, c in ipairs(use.card.subcards) do
          local card = Fk:getCardById(c)
          if table.find({"@fujia-public", "@kongchao-public", "@canqu-public", "@zhuzhan-public", "@heg_yibing-public"}, function(mark)
          return card.extra_data and card.extra_data.heg_variation and card.extra_data.heg_variation[1] == mark end) then
          use.extra_data = use.extra_data or {}
          use.card.extra_data = use.card.extra_data or {}
          use.extra_data.heg_variation_type = {"@fujia-public", "@kongchao-public", "@canqu-public", "@zhuzhan-public", "@heg_yibing-public"}
          use.card.extra_data.heg_variation = card.extra_data.heg_variation
          break
        end
      end
    end,
    view_as = function(self, player, cards)
      if #cards < 2 or not self.interaction.data then return end
      local card = Fk:cloneCard(self.interaction.data)
      card:addSubcards(cards)
      card.skillName = zhuosheng.name
      return card
    end,
    enabled_at_play = function (self, player)
      return player:usedSkillTimes(zhuosheng.name, Player.HistoryTurn) == 0 and #player:getHandlyIds() > 1
    end,
    enabled_at_response = function (self, player, response)
      return player:usedSkillTimes(zhuosheng.name, Player.HistoryTurn) == 0 and #player:getHandlyIds() > 1
    end,
})

return zhuosheng